<template>
  <div>
    创建一个新的home组件
    <p>{{count}}</p>
    <p>{{ doubleCount }}</p>
    <button @click="btn">点击</button>
  </div>
</template>

<script lang="ts" setup>
import { storeToRefs  } from 'pinia'
import { useMystore } from '@/store/index'

const myStore = useMystore()
const {count,doubleCount} = storeToRefs(myStore)

console.log(storeToRefs(myStore))

// console.log(myStore)
// console.log(myStore.count)


const btn = ()=>{
  // console.log(this.doubleCount)
  // myStore.increment()
}

</script>

<style lang="scss" scoped>

</style>